<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function sum(...args){
            console.log(args);
            const res = args.reduce(function(total,current){
                return total + current
            },0)
            return res
        }
        const res = sum(10,20)
        const res2 = sum(10,20,69,89,33)
        const res3 = sum(10,20,89,34,11,33,32)
        console.log(res,res2,res3);
    </script>
</body>
</html>